home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 48 / Amiga Format CD48 (1999-12-13)(Future Publishing)(GB)(Track 1 of 2)[!][issue 2000-01].iso / -websites- / whdload / games / worldsoflegend.lha / WorldsOfLegend / Install < prev    next >
Text File  |  1998-06-04  |  3KB  |  165 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "")        ;sub directory containing data files
  4. (set #readme-file "README")    ;name of readme file
  5. (set #cleanup "c/legend")        ;files to delete after install
  6.  
  7. ;****************************
  8.  
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  20.   )
  21. )
  22.  
  23. ;----------------------------
  24. ; Wait for inserting disk
  25. ; IN:  #AD_disk - name of disk
  26. ; OUT: -
  27.  
  28. (procedure P_disk
  29.   (askdisk
  30.     (dest #AD_disk)
  31.     (prompt ("\nInsert Disk \"%s\" in any drive !" #AD_disk))
  32.     (help @askdisk-help)
  33.   )
  34. )
  35.  
  36. ;****************************
  37.  
  38. (set #program "WHDLoad")
  39. (P_chkrun)
  40.  
  41. ;(set #program "Reloc")
  42. ;(P_chkrun)
  43.  
  44. (set @default-dest
  45.   (askdir
  46.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically be created." @app-name @app-name))
  47.     (help @askdir-help)
  48.     (default @default-dest)
  49.     (disk)
  50.   )
  51. )
  52. (set #dest (tackon @default-dest @app-name))
  53. (if
  54.   (exists #dest)
  55.   (
  56.     (set #choice
  57.       (askbool
  58.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  59.         (default 1)
  60.         (choices "Delete" "Skip")
  61.         (help @askbool-help)
  62.       )
  63.     )
  64.     (if
  65.       (= #choice 1)
  66.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  67.     )
  68.   )
  69. )
  70. (makedir #dest
  71.   (help @makedir-help)
  72.   (infos)
  73. )
  74.  
  75. ;----------------------------
  76.  
  77. (copyfiles
  78.   (help @copyfiles-help)
  79.   (source ("wol.slave"))
  80.   (dest #dest)
  81. )
  82. (copyfiles
  83.   (help @copyfiles-help)
  84.   (source ("Empire.inf"))
  85.   (newname ("Empire.info"))
  86.   (dest #dest)
  87. )
  88. (copyfiles
  89.   (help @copyfiles-help)
  90.   (source ("getsavedisk.slave"))
  91.   (dest #dest)
  92. )
  93. (copyfiles
  94.   (help @copyfiles-help)
  95.   (source ("Install_Savedisk"))
  96.   (dest #dest)
  97. )
  98. (copyfiles
  99.   (help @copyfiles-help)
  100.   (source ("Install_savedisk.inf"))
  101.   (newname ("Install_Savedisk.info"))
  102.   (dest #dest)
  103. )
  104. (if
  105.   (exists #readme-file)
  106.   (copyfiles
  107.     (help @copyfiles-help)
  108.     (source #readme-file)
  109.     (dest #dest)
  110.   )
  111. )
  112. (if
  113.   (= #sub-dir "")
  114.   ("")
  115.   (
  116.     (set #dest (tackon #dest #sub-dir))
  117.     (makedir #dest
  118.       (help @makedir-help)
  119.     )
  120.   )
  121. )
  122.  
  123. ;----------------------------
  124.  
  125. (set #AD_disk "Empire Boot")
  126. (P_disk)
  127. (copyfiles
  128.   (help @copyfiles-help)
  129.   (source ("%s:" #AD_disk))
  130.   (dest #dest)
  131.   (pattern "~(s)")
  132. )
  133. ;(rename (tackon #dest "10") (tackon #dest "exe"))
  134. (if
  135.   (= 0 (run "reloc" (tackon #dest "c/legend") (tackon #dest "c/legend.10000") "ADR=$10000" "QUIET" ">con://///WAIT/CLOSE/AUTO"))
  136.   ("")
  137.   (abort "\"Reloc\" has failed")
  138. )
  139.  
  140. (set #AD_disk "Empire World")
  141. (P_disk)
  142. (copyfiles
  143.   (help @copyfiles-help)
  144.   (source ("%s:" #AD_disk))
  145.   (dest #dest)
  146.   (pattern "#?")
  147. )
  148.  
  149.  
  150. ;----------------------------
  151.  
  152. (run ("Delete %s ALL QUIET FORCE" #cleanup))
  153.  
  154. (if
  155.   (exists #readme-file)
  156.   (if 
  157.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  158.     ("")
  159.     (run ("SYS:Utilities/More %s" #readme-file))
  160.   )
  161. )
  162.  
  163. (exit)
  164.  
  165.